package com.lxl.rabbitmq1.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class NewsConsumer {
    @RabbitListener(queues = "it_news_queue")
    public void  show(String message){

        System.out.println("技术部接收到的消息："+message);
    }
    @RabbitListener(queues = "market_news_queue")
    public void  getmes(String message){

        System.out.println("市场部接收到的消息："+message);
    }
}